com.supermap.ar.areffect

Class ARParticleElement



  • public class ARParticleElement
    extends AREffectElement
    AR special effect object. Particle object model
    • Constructor Detail

      • ARParticleElement

        public ARParticleElement(android.content.Context context)
        Construction method
        Parameters:
        context -
    • Method Detail

      • isRandomSize

        public boolean isRandomSize()
        Whether the size of the current model is random
        Returns:
      • setRandomSize

        public void setRandomSize(boolean isRandomSize)
        Sets whether you want the size of the current model is random
        Parameters:
        isRandomSize -
      • setDiffusivityX

        public void setDiffusivityX(float diffusivityX)
        Sets the diffusion coefficient of x-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite
        Parameters:
        diffusivityX -
      • getDiffusivityX

        public float getDiffusivityX()
        Gets the diffusion coefficient of x-axis
        Returns:
      • setDiffusivityY

        public void setDiffusivityY(float diffusivityY)
        Sets the diffusion coefficient of y-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite
        Parameters:
        diffusivityY -
      • getDiffusivityY

        public float getDiffusivityY()
        Gets the diffusion coefficient of y-axis
        Returns:
      • setDiffusivityZ

        public void setDiffusivityZ(float diffusivityZ)
        Sets the diffusion coefficient of z-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite
        Parameters:
        diffusivityZ -
      • getDiffusivityZ

        public float getDiffusivityZ()
        Gets the diffusion coefficient of z-axis
        Returns:
      • setGaussian

        public void setGaussian(boolean isGaussian)
        Sets whether to use Gaussian distribution to produce new position
        Parameters:
        isGaussian -
      • isGaussian

        public boolean isGaussian()
        Whether the model will use Gaussian distribution to produce new position
        Returns:
      • setInitRandomDirection

        public void setInitRandomDirection(boolean isRandomDirection)
        Whether the direction of a single particle is random when initializing it
        Parameters:
        isRandomDirection -
      • isInitRandomDirection

        public boolean isInitRandomDirection()
        The direction of a single particle is random when initializing it
        Returns:
      • init

        public void init(int count)
        Initialize: generating particle collection Generating multiple AR special effect objects. In the meanwhile, changes their positions and rotation angles randomly and saves to the sub object array
        Parameters:
        count - the number of particles to be generated
      • createDefaultAnimation

        public void createDefaultAnimation(ARAnimationParameter parameter,
                                           java.lang.String animationGroupName)
        Create particle object default animation
        Parameters:
        paramter - AR animation parameter.
        animationGroupName - the name of the animation group
      • createTranslatingAnimation

        public void createTranslatingAnimation(ARAnimationParameter parameter,
                                               java.lang.String animationGroupName)
        Creates particle placement animation
        Parameters:
        paramter - The animation parameter.
        animationGroupName - the name of the animation group
      • createRotatingAnimation

        public void createRotatingAnimation(ARAnimationParameter parameter,
                                            java.lang.String animationGroupName)
        Creates particle rotation animation
        Parameters:
        paramter - AR animation parameter.
        animationGroupName - the name of the animation group